package com.qst.dao;

import com.qst.pojo.Employee;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author KungSu.
 * @create 2021-06-18 9:44
 */

@Repository
public interface ApproveDao {
    /**
     * 查询未审批状态的用户
     *
     * @return
     */
    @Select("select * from employee where `status` = 0 or `status` = 2")
    List<Employee> findStatus();

    /**
     * 修改用户状态
     *
     * @param employeeid
     */
    @Update("UPDATE employee SET `status` = 1 WHERE employeeid = #{employeeid} ")
    void setStatues(Integer employeeid);

    @Delete("delete from employee where employeeid = #{employeeid}")
    void delEmp(Integer employeeid);
}
